package com.chuangjiangx.member.manager.client.web.basic.request.aiface;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * 收银员登录请求参数
 *
 * @author 马文韬
 * @version 1.0
 * @date: 2018/9/13
 */
@Getter
@Setter
@ApiModel(value = "登录收银员对象")
public class LoginCashierRequest {

    /**
     * 设备MAC地址
     */
    @NotBlank(message = "MAC地址不能为空")
    @Pattern(regexp = "([A-Fa-f0-9]{2}(-|:)){5}[A-Fa-f0-9]{2}", message = "MAC地址格式有误")
    @ApiModelProperty(value = "MAC地址", required = true, example = "00-00-00-00-00-00 或 00:00:00:00:00:00")
    private String macAddress;

    /**
     * 设备类型
     *  1 - Android
     */
    @NotNull
    @Min(value = 1, message = "目前只支持设备类型 Android - 1")
    @Max(value = 1, message = "目前只支持设备类型 Android - 1")
    @ApiModelProperty(value = "设备类型", required = true, allowableValues = "1 - Android",
            notes = "1 - Android")
    private Byte deviceType;

    /**
     * 用户名
     */
    @NotBlank(message = "用户名不能为空")
    @ApiModelProperty(value = "用户名", required = true)
    private String username;

    /**
     * 密码
     */
    @NotNull(message = "密码不能为空")
    @ApiModelProperty(value = "密码", required = true)
    private String password;

    /**
     * 极光推送ID
     */
    @ApiModelProperty(value = "极光推送ID")
    private String cid;

}
